package cn.itcast.zt.demo02;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 模拟实现并行计算500个一亿求和
 * 存储每个县城计算的值
 * create by zhangtian on 2019/1/22
 */
@Getter
@Setter
@ToString
public class SingleSumEvent {
    private String thread ;
    private long value ;

    public void caculate(long start, long end) {
        for(long i = start; i <= end; i++) {
            value += i ;
        }
    }
}
